﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tuwen_shucai_list.aspx.cs" Inherits="MxWeiXinPF.Web.admin.crm.tuwen_shucai_list" %>


<%@ Import Namespace="MxWeiXinPF.Common" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>图文列表</title>
    <%=PageJSAndStype("list").ToString() %>

    <script type="text/javascript">
        $(function () {

            //图片延迟加载
            $(".pic img").lazyload({ load: AutoResizeImage, effect: "fadeIn" });
            //点击图片链接
            $(".pic img").click(function () {
                //$.dialog({ lock: true, title: "查看大图", content: "<img src=\"" + $(this).attr("src") + "\" />", padding: 0 });
                var linkUrl = $(this).parent().parent().find(".foot a").attr("href");
                if (linkUrl != "") {
                    location.href = linkUrl; //跳转到修改页面
                }
            });

            //创建图文的窗口 
            $("#aLookIndex").click(function () {
                console.log("begin");
                var contenturl = "url:templates/showPhone.aspx";
                var m = $.dialog({
                    id: 'dialogGuiZe',
                    fixed: true,
                    lock: true,
                    max: false,
                    min: false,
                    title: "查看模版效果",
                    content: contenturl,
                    height: 600,
                    width: 360,
                    close: function () {

                    }
                });
                console.log("end");
            })
        });

    </script>
</head>

<body class="mainbody">
    <form id="form1" runat="server">
        <!--导航栏-->
        <div class="location">
            <a href="tuwen_shucai_categorylist.aspx" class="home"><i class="iconfont icon-home"></i><span>图文素材分类</span></a>
          <i class="arrow iconfont icon-arrow-right"></i><i></i><span>图文列表【所属分类：<asp:Label ID="lblcategoryName" runat="server" Text=""></asp:Label>】</span>

        </div>
        <!--/导航栏-->

        <!--工具栏-->
<div id="floatHead" class="toolbar-wrap">
  <div class="toolbar">
    <div class="box-wrap">
      <a class="menu-btn"></a>

                    <div class="l-list">
                        <ul class="icon-list">

                            <li><a class="add" href="tuwen_shucai_edit.aspx?action=<%=MXEnums.ActionEnum.Add %>&category_id=<%=category_id %>"><i  class="iconfont icon-close"></i><span>新增图文</span></a></li>
                            <li>
                                <asp:LinkButton ID="btnSave" runat="server" CssClass="save" OnClick="btnSave_Click"><i  class="iconfont icon-save"></i><span>保存</span></asp:LinkButton></li>
                            <li><a class="all" href="javascript:;" onclick="checkAll(this);"><i  class="iconfont icon-check"></i><span>全选</span></a></li>
                            <li>
                                <asp:LinkButton ID="btnDelete" runat="server" CssClass="del" OnClientClick="return ExePostBack('btnDelete');" OnClick="btnDelete_Click"><i class="iconfont icon-delete"></i><span>删除</span></asp:LinkButton></li>
                        </ul>

                    </div>
                    <div class="r-list">
                        <asp:TextBox ID="txtKeywords" runat="server" CssClass="keyword" />
                        <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="btn-search" OnClick="btnSearch_Click"><i class="iconfont icon-search"></i></asp:LinkButton>

                    </div>
                </div>
            </div>
        </div>
        <!--/工具栏-->

        <!--文字列表-->
        <asp:Repeater ID="rptList1" runat="server">
            <HeaderTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
                    <tr>
                        <th width="6%">选择</th>
                        <th align="left">标题</th>
                        <th align="left" width="15%">封面图片</th>
                        <th align="left" width="12%">添加时间</th>
                        <th align="left" width="65">排序</th>

                        <th width="8%">操作</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td align="center">
                        <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" Style="vertical-align: middle;" />
                        <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
                    </td>
                    <td>
                        <a href="tuwen_shucai_edit.aspx?action=<%#MXEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>&category_id=<%#Eval("category_id") %>"><%#Eval("title")%></a>

                    </td>

                    <td>
                        <div class="wxico_container">
                            <asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("img_url")%>' Style="max-height: 60px; max-width: 60px;" />
                        </div>
                    </td>

                    <td><%#string.Format("{0:g}",Eval("add_time"))%></td>
                    <td>
                        <asp:TextBox ID="txtSortId" runat="server" Text='<%#Eval("sort_id")%>' CssClass="sort" onkeydown="return checkNumber(event);" />
                    </td>

                    <td align="center">
                        <a href="tuwen_shucai_edit.aspx?action=<%#MXEnums.ActionEnum.Edit %>&id=<%#Eval("id") %>&category_id=<%# Eval("category_id")%>">修改</a>


                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <%#rptList1.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"6\">暂无记录，请添加图文文章</td></tr>" : ""%>
</table>
            </FooterTemplate>
        </asp:Repeater>
        <!--/文字列表-->



        <!--内容底部-->
        <div class="line20"></div>
        <div class="pagelist">
            <div class="l-btns">
                <span>显示</span><asp:TextBox ID="txtPageNum" runat="server" CssClass="pagenum" onkeydown="return checkNumber(event);" OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span>条/页</span>
            </div>
            <div id="PageContent" runat="server" class="default"></div>
        </div>
        <!--/内容底部-->



    </form>
</body>
</html>
